# -*- coding: utf-8 -*-
"""
@Time ： 2024/4/9 20:21
@Auth ： fcq
@File ：get_split_label_final.py
@IDE ：PyCharm
@Motto：ABC(Always Be Coding)
"""

import json

if __name__ == "__main__":
    with open("../VAST/lda_vast_train.json", 'r', encoding='utf-8') as f:
        data_1 = json.load(f)

    with open("../VAST/lda_vast_train_cross_senti.json", encoding='utf-8') as f:
        data_2 = json.load(f)

    for i in range(len(data_1)):
        if data_2[i]['cross_senti'] == 1:
            data_2[i]['split_label'] = 0
        else:
            if data_1[i]['cross_label_new'] == 1:
                data_2[i]['split_label'] = 1
            else:
                data_2[i]['split_label'] = 2

    with open("../VAST/lda_vast_train_cross_senti.json", 'w', encoding='utf-8') as f:
        json.dump(data_2, f, ensure_ascii=False)
